#include <map>
#include <set>
#include <vector>
#include "json/json.h"
using namespace std;

enum DefectType {
  PointerOutOfBound = 1,
  LoopWithExternalInput,
  StructOutOfBound,
  ExternalInputIntegerOverflow,
  DeadLoop,
  DivOrDodByZero,
  SQLInjection,
  IntegerOverflow,
  NullPointerDereference,
  UseAfterFree,
  ContainerNullCheck,
  FilePathFormat
};


class Report {
public:
  // void addToReport(int DetectType, string fileName, int Line);
  void addToReport(DefectType dt, std::string fileName, int line);
  // void writeJson();
  void writeJsonToFile();
  // vector<defect> getDefects() { return Defects; }

private:
  // vector<defect> Defects;
  std::map<DefectType, std::map<string, std::set<int>>> defectsInfo;
};
